package com.vehicle.service.impl;

import com.vehicle.bean.RoleUser;
import com.vehicle.mapper.RoleUserMapper;
import com.vehicle.service.RoleUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 校园车辆管理系统
 * @since 2023-05-28
 */
@Service
public class RoleUserServiceImpl extends ServiceImpl<RoleUserMapper, RoleUser> implements RoleUserService {

    @Autowired
    RoleUserMapper roleUserMapper;

    @Override
    public Integer getRoleIdByUserId(Integer id) {
        return roleUserMapper.getMyRoleId(id,null);
    }

    @Override
    public Integer getRoleIdByAdminId(Integer id) {
        return roleUserMapper.getMyRoleId(null,id);
    }
}
